<?php
/**
 * Created by PhpStorm.
 * User: TC
 * Date: 2015/10/22
 * Time: 15:29
 */
require_once dirname(__FILE__ ) . '/libs/db/connectMongoDB.php';

Index();

function Index() {
    $conn = connectDB::getInstance();
    $mongoDB = $conn->openDB();
    if(is_object($mongoDB)) {
        var_dump('yes new');
    } else {
        var_dump('no');
    }
    $conn = connectDB::getInstance();
    $mongoDB = $conn->openDB();
    if(is_object($mongoDB)) {
        var_dump('yes new1');
    } else {
        var_dump('no');
    }
    $conn = connectDB::getInstance();
    $mongoDB = $conn->openDB();
    if(is_object($mongoDB)) {
        var_dump('yes new2');
    } else {
        var_dump('no');
    }
    $conn->closeDB();
    unset($conn);

    $conn = connectDB::getInstance();
    $mongoDB = $conn->openDB();
    if(is_object($mongoDB)) {
        var_dump('yes new4');
    } else {
        var_dump('no');
    }
    $conn = connectDB::getInstance();
    $mongoDB = $conn->openDB();
    if(is_object($mongoDB)) {
        var_dump('yes new5');
    } else {
        var_dump('no');
    }
    $conn = connectDB::getInstance();
    $mongoDB = $conn->openDB();
    if(is_object($mongoDB)) {
        var_dump('yes new6');
    } else {
        var_dump('no');
    }
}